blob: ed5f9e40e61099f6c99a62330332bcc49e431767 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import { notFound } from "next/navigation";
import Bookmarks from "@/components/dashboard/bookmarks/Bookmarks";
import { api } from "@/server/api/client";
import { TRPCError } from "@trpc/server";
export default async function FeedPage({
params,
}: {
params: { feedId: string };
}) {
let feed;
try {
feed = await api.feeds.get({ feedId: params.feedId });
} catch (e) {
if (e instanceof TRPCError) {
if (e.code == "NOT_FOUND") {
notFound();
}
}
throw e;
}
return (
<Bookmarks
query={{ rssFeedId: feed.id }}
showDivider={true}
showEditorCard={false}
header={<div className="text-2xl">{feed.name}</div>}
/>
);
}
|